import React,{useState,useEffect} from 'react'
import axios from 'axios'
import './fl.css'
import { NavLink, Switch, Route, Redirect, } from 'react-router-dom/cjs/react-router-dom.min'
import Fl1 from './fl1'
import Fl2 from './Fl2'
import Fl3 from './Fl3'
import Fldetail from './Fldetail'

export default function Fl(props) {
  return (
    
    <div className='box1'>
      <div className='searchbox'>
                <div className='search' onClick={() => props.history.push('/search') }>
                    <span className="iconfont icon-Magnifier"></span> 
                    <span>请输入搜索关键字</span>
                </div>
      </div>
      <div>
        <ul className='cnav'>
          <li>
              <NavLink to='/fl/fldetail/150'>手机数码</NavLink></li>
            <li>
              <NavLink to='/fl/fldetail/157'>服饰鞋包</NavLink>
            </li>
            <li>
              <NavLink to='/fl/fldetail/415'>教育文具</NavLink>
            </li>
            
          
        </ul>
      </div>
      <div className='content'>
        <Switch>
        <Route path='/fl/fldetail/:id' component={Fldetail}></Route>
        <Redirect from='/fl' to='/fl/fldetail/150' exact></Redirect>
        </Switch>
        
      </div>
    </div>
  )
}
